-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move to Biome #28
Move to Biome #28
Conversation
"linter": { | ||
"rules": { | ||
"performance": { | ||
"noBarrelFile": "off", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 Shouldn't this be "on"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That rule is mostly useful for applications or larger libraries with plenty of optional imports. What would be the benefit of having indirect export structure in a library with just a few exports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would simply aim for consistency, and never use barrel files (no matter the size of the project). Or are there any scenarios where we still want to use them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that if you don't have a barrel file in a library, you can no longer have imports like
import { Client, RequestError, EMPTY_SCHEMA } from 'my-library'
unless they all come from the same file. For me this also brings worse DX, or clutters code structure of the library.
So for libraries where tree-shaking is not important I'd still go with barrel files. maybe we need separate biome preset for them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. We need to find the right balance with this.
Changes
Biome is faster and brings in way less dependencies.
Checklist
major
,minor
,patch
orskip-release